
import config from './config'


export default function ({url,method='get',data={}}){
  return new Promise((resolve,reject)=>{
    wx.request({
      url: config.baseUrl + url,
      method,
      data,
      header:{
        cookie:'MUSIC_U=7482d7bb793d324907179fadd032550947708581746ed94309daf0202746e158519e07624a9f00533f33a28a41388f3242ee752666a3f6da03ba0a298a622eb3508c7bca8b3b083bd4dbf082a8813684'
      },
      success:res => {
        resolve(res.data)
      },
      fail:error => {
        reject(error)
      }
    })
  })
}